#include<signal.h>
#include<iostream>
#include<sys/types.h>
#include<cstdlib>
#include<string>
using namespace std;
static void Usage(const string& proc)
{
    cout<<"\nUsage: "<<proc<<" pid signo\n"<<endl;
}
int main(int argc,char* argv[])
{
    if(argc != 3)
    {
        Usage(argv[0]);
        exit(1);
    }
    pid_t pid = atoi(argv[1]);
    int signo = atoi(argv[2]);
    int n = kill(pid,signo);
    if(n != 0)
    {
        perror("kill");
    }
    return 0;
}